home *** CD-ROM | disk | FTP | other *** search
- { DECLARES.P -- declarations for picture handlers }
-
- { Copyright (c) 1987, Ciarcia's Circuit Cellar }
- { All Rights Reserved }
-
- {-------------------------------------------------------}
- { Global constants }
-
- CONST
-
- {--- defaults for serial port setup }
-
- bitsec = 28800; { default serial speed }
- COMport = $3F8; { 3F8 = COM1 }
- { 2F8 = COM2 }
-
- {--- resolution control bytes to receiver & transmitter }
-
- fullres = $80; { set high resolution }
- halfres = $81; { set high resolution }
- quartres = $82; { set high resolution }
-
- {--- control bytes from transmitter }
-
- fieldsync = $40; { new field! }
- linesync = $41; { new line }
- fldend = $42; { end of field }
- rep1 = $80; { repeat x1 }
- rep16 = $90; { repeat x16 }
-
- {--- image structure }
-
- maxbit = $3F; { bits used in pel }
- maxpel = 255; { highest pel index }
- maxline = 243; { highest line index }
- maxbuffer = 32766; { highest "INT" index }
-
- {-------------------------------------------------------}
- { Global types }
-
- TYPE
-
- bitrng = 0..maxbit; { bit range }
- pelrng = 0..maxpel; { pel indexes }
- linerng = 0..maxline; { line indexes }
- subrng = 0..maxbuffer; { raw data indexes }
-
- pelrec = RECORD { one scan line }
- syncL : BYTE;
- pels : ARRAY[pelrng] OF BYTE;
- END;
-
- linerec = RECORD { complete binary field }
- syncF : BYTE;
- lines : ARRAY[linerng] OF pelrec;
- syncE : BYTE;
- END;
-
- rawrec = ARRAY[subrng] OF INTEGER;
-
- picptr = ^pictype; { picture ptr }
- pictype = RECORD CASE INTEGER OF { picture formats}
- 0 : (fmt : linerec);
- 1 : (words : rawrec);
- 1 : (bytes : BYTE); { dummy }
- END;
-
- histtype = ARRAY[bitrng] OF REAL; { pel histograms }
-
- regrec = RECORD CASE INTEGER OF
- 1 : (AX : INTEGER;
- BX : INTEGER;
- CX : INTEGER;
- DX : INTEGER;
- BP : INTEGER;
- SI : INTEGER;
- DI : INTEGER;
- DS : INTEGER;
- ES : INTEGER;
- FLAGS : INTEGER);
- 2 : (AL,AH : BYTE;
- BL,BH : BYTE;
- CL,CH : BYTE;
- DL,DH : BYTE);
- END;
-
- byteptr = ^BYTE; { general ptr }
- strtype = STRING[255]; { strings }
-
-
- {-------------------------------------------------------}
- { Global variables }
-
- VAR
-
- picfile : FILE OF pictype;
- pic0 : picptr;
- pic1 : picptr;
- pic2 : picptr;
- pic3 : picptr;
- histo : histtype;
-
- IOerror : BYTE;
- filespec : strtype;
- filespec2 : strtype;
-